package com.ronghuanet.user.rabbitmq.handler;

import com.rabbitmq.client.Channel;
import com.ronghuanet.user.config.RegisterNoticeRabbitmqConfig;
import com.ronghuanet.user.dto.RegisterNoticeDto;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class RegisterNoticeEmailReceiveHandler {
    //监听email队列
    //@RabbitListener(queues = {RegisterNoticeRabbitmqConfig.QUEUE_INFORM_EMAIL})
    public void receive_email(RegisterNoticeDto registerNoticeDto, Message message, Channel channel) {
        System.out.println(registerNoticeDto.getReceiver());
        System.out.println(registerNoticeDto.getContent());

        //就可以使用email技术进行发送 @TODO
    }
}